test(dashboards): Switch EventsSearchBar test to use paste#110223
test(dashboards): Switch EventsSearchBar test to use paste#110223
Conversation
example flake https://github.com/getsentry/sentry/actions/runs/22865175272/job/66329929728 paste sometimes works a bit better because it doesn't have to rerender the complex component on every keyup/keydown that sort of thing. type literally types each character one by one.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| ).not.toBeInTheDocument(); | ||
| await waitFor(() => { | ||
| expect(screen.queryByText(/p50/)).not.toBeInTheDocument(); | ||
| }); |
There was a problem hiding this comment.
Negative assertion in waitFor passes vacuously before dropdown loads
Medium Severity
The waitFor wrapping expect(screen.queryByText(/p50/)).not.toBeInTheDocument() succeeds immediately because /p50/ isn't on screen yet — including before the dropdown has even loaded. The original code used within(screen.getByRole('listbox')) which implicitly asserted the dropdown was present before checking the negative condition. Now the test can pass vacuously even if the paste doesn't trigger the dropdown at all, meaning the test no longer validates the actual feature behavior.


example flake https://github.com/getsentry/sentry/actions/runs/22865175272/job/66329929728 paste sometimes works a bit better because it doesn't have to rerender the complex component on every keyup/keydown that sort of thing. type literally types each character one by one.